package com.h3c.ptability.config;


import com.h3c.ptability.service.CommService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

/**
 * 程序启动时执行初始化
 */
@Slf4j
@Component
public class PTAppInitRunner implements ApplicationRunner {

    @Autowired
    CommService commService;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        commService.initData();
    }
}
